<template>
  <div class="layout">
    <AppSidebar ref="AppSidebar" />
    <div style="flex: 1 0; overflow: hidden">
      <AppHeader ref="AppHeader" />
      <AppMain ref="AppMain" />
    </div>
  </div>
</template>

<script setup>
import { storeToRefs } from "pinia";
import { useGlobalStore } from "@/store/modules/global";
import config from "@/layouts/config";
/* components */
import AppSidebar from "@/layouts/components/Sidebar/index.vue";
import AppHeader from "@/layouts/components/Header/index.vue";
import AppMain from "@/layouts/components/Main/index.vue";
/*  */
const { isCollapse } = storeToRefs(useGlobalStore());

/* 动态样式 */
/* const customStyle = computed(() => ({
  width: `calc(100% - ${
    isCollapse.value ? config.sidebarCollapseWidth : config.sidebarWidth
  })`,
})); */
</script>
<style lang="scss" scoped>
.layout {
  width: 100%;
  height: 100%;
  display: flex;
}
</style>
